import java.util.HashMap;
import java.util.Scanner;

public class demo2 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String str=scanner.next();
        boolean flag=false;
        int left=0,right=0;
        StringBuilder stringBuilder=new StringBuilder();
        while (right<str.length()){
            stringBuilder.append(str.charAt(right++));
            while (str.charAt(right)==str.charAt(left))right++;
            if(right-left<=1){
                continue;
            }else{
                flag=true;
                stringBuilder.append((char) (right-left));
            }
            left=right;
        }
        if(flag){
            System.out.println(stringBuilder.toString());
        }else {
            System.out.println("NO");
        }
    }
}
